<?php
$this->pageTitle = Lang::t('user.profile.page.breadcrumbs');
$this->breadcrumbs[] = Lang::t('user.profile.page.breadcrumbs');
?>
<div class="form">
    <?php
    $formConfig['htmlOptions']['class'] = 'form-horizontal';
    $formConfig['htmlOptions']['role'] = 'form';
    ?>
    <?php $form = $this->beginWidget('ActiveForm', $formConfig); ?>

    <h1><?php echo Lang::t('user.profile.page.title'); ?></h1>
    <span class="help-block"><?php echo Lang::t('user.profile.form.note'); ?></span>

    <?php
    echo $form->alert(array($user), array(
        'errorMessageHtmlOptions' => array('class' => 'alert alert-danger'),
        'flashHtmlOptions' => array('class' => 'alert alert-'),
    ));
    ?>

    <div class="form-group">
        <?php echo $form->labelEx($user, 'image_', array('class' => 'col-sm-3 control-label')); ?>
        <div class="col-sm-4">
            <?php
            echo $form->avatarUpload($user, 'image_', array(
                'class' => 'form-control',
                'thresholdHtmlOptions' => array(
                    'class'=>'',
                ),
            ));
            ?><?php //echo $form->error($user, 'image_');   ?>
        </div>
    </div>

    <hr />

    <div class="form-group">
        <?php echo $form->labelEx($user, 'username_', array('class' => 'col-sm-3 control-label')); ?>
        <div class="col-sm-3">
        <?php echo $form->textField($user, 'username_', array('class' => 'form-control')); ?><?php //echo $form->error($user,'username_');  ?>
        </div>
    </div>
    
    <div class="form-group">
        <?php echo $form->labelEx($user, 'firstName_', array('class' => 'col-sm-3 control-label')); ?>
        <div class="col-sm-3">
        <?php echo $form->textField($user, 'firstName_', array('class' => 'form-control')); ?><?php //echo $form->error($user,'firstName_');  ?>
        </div>
        
        <?php echo $form->labelEx($user, 'lastName_', array('class' => 'col-sm-3 control-label')); ?>
        <div class="col-sm-3">
        <?php echo $form->textField($user, 'lastName_', array('class' => 'form-control')); ?><?php //echo $form->error($user,'lastName_');  ?>
        </div>
    </div>

    <hr />

    <div class="form-group">
        <button type="submit" class="btn btn-default" /><?php echo Lang::t('user.profile.btn.submit'); ?></button>
    </div>

<?php $this->endWidget(); ?>
</div><!--form-->